<table>
    <tbody>
        <input type="hidden" id="UserHistoryUserIdSearch" name="data[UserHistory][user_id]" value="" />
        <tr>
            <td><?php echo $form->label("UserHistory.log_in_time", 'Log in Date'); ?></td>
            <td>
                <div id="logInDatePicker"></div>
                <input type="hidden" id="logInDate" name="data[UserHistory][log_in_time]" />
            </td>
        </tr>
    </tbody>
</table>
<script type="text/javascript">
    $j("#logInDatePicker").datepicker({
        altField: '#logInDate',
        altFormat: 'yy-mm-dd',
        changeMonth: true,
        changeYear: true
    });
    $("UserHistoryUserIdSearch").value = $F("UserHistoryUserId");
</script>